﻿<%@ Page Language="C#" MasterPageFile="~/admin/Admin.master" AutoEventWireup="true" CodeFile="ManagerCustomer.aspx.cs" Inherits="admin_ManagerCustomer" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderContent" Runat="Server">
    <div style="float: right; margin-right: 10px">
        <asp:Label ID="Label1" runat="server" Text="Search"></asp:Label>
        &nbsp;<asp:DropDownList ID="DropDownListSearchUser" runat="server" Width="100px">
            <asp:ListItem>Email</asp:ListItem>
            <asp:ListItem>Name</asp:ListItem>
            <asp:ListItem>ID</asp:ListItem>
        </asp:DropDownList>
        &nbsp;<asp:TextBox ID="TextBox1" runat="server" Width="200px"></asp:TextBox>
        &nbsp;
        <asp:Button ID="ButtonSCustomer" runat="server" BorderStyle="Solid" Text="OK" 
            onclick="ButtonSCustomer_Click" />
    </div>
    <br />
    <br />
    <asp:GridView ID="GridViewCustomer" runat="server" AllowPaging="True" 
        AutoGenerateColumns="False" BackColor="White" BorderColor="#CCCCCC" 
        BorderStyle="None" BorderWidth="1px" CellPadding="4" DataKeyNames="cus_id" 
        DataSourceID="ObjectDataSource1" ForeColor="Black" GridLines="Horizontal" 
        Width="750px" 
        onselectedindexchanged="GridViewCustomer_SelectedIndexChanged">
        <Columns>
            <asp:BoundField DataField="cus_id" HeaderText="ID" InsertVisible="False" 
                ReadOnly="True" SortExpression="cus_id" />
            <asp:BoundField DataField="cus_firstname" HeaderText="First name" 
                SortExpression="cus_firstname" />
            <asp:BoundField DataField="cus_lastname" HeaderText="Last name" 
                SortExpression="cus_lastname" />
            <asp:CheckBoxField DataField="cus_gender" HeaderText="Gender" 
                SortExpression="cus_gender" />
            <asp:BoundField DataField="cus_address" HeaderText="Address" 
                SortExpression="cus_address" />
            <asp:BoundField DataField="cus_email" HeaderText="Email" 
                SortExpression="cus_email" />
            <asp:BoundField DataField="cus_phone" HeaderText="Phone" 
                SortExpression="cus_phone" />
            <asp:CommandField ShowSelectButton="True" />
            <asp:CommandField ShowDeleteButton="True" />
        </Columns>
        <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
        <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
        <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
    </asp:GridView>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        DeleteMethod="Delete" InsertMethod="Insert" 
        OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" 
        TypeName="DataSet2TableAdapters.tbl_customerTableAdapter" UpdateMethod="Update">
        <DeleteParameters>
            <asp:Parameter Name="Original_cus_id" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="cus_firstname" Type="String" />
            <asp:Parameter Name="cus_lastname" Type="String" />
            <asp:Parameter Name="cus_dateOfbirth" Type="DateTime" />
            <asp:Parameter Name="cus_gender" Type="Boolean" />
            <asp:Parameter Name="cus_address" Type="String" />
            <asp:Parameter Name="cus_email" Type="String" />
            <asp:Parameter Name="cus_password" Type="String" />
            <asp:Parameter Name="cus_phone" Type="String" />
            <asp:Parameter Name="role" Type="Int32" />
            <asp:Parameter Name="Original_cus_id" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="cus_firstname" Type="String" />
            <asp:Parameter Name="cus_lastname" Type="String" />
            <asp:Parameter Name="cus_dateOfbirth" Type="DateTime" />
            <asp:Parameter Name="cus_gender" Type="Boolean" />
            <asp:Parameter Name="cus_address" Type="String" />
            <asp:Parameter Name="cus_email" Type="String" />
            <asp:Parameter Name="cus_password" Type="String" />
            <asp:Parameter Name="cus_phone" Type="String" />
            <asp:Parameter Name="role" Type="Int32" />
        </InsertParameters>
    </asp:ObjectDataSource>
</asp:Content>

